<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Boolean</title>
</head>

<body>
    <script>
        var o = new Boolean(false)

        console.log(o, o.valueOf())//Boolean对象 值为false

        //	将一个变量转为布尔类型
        console.log(!!5)//true
        console.log(Boolean(5))//true

        console.log(!!o)//true
        console.log(Boolean(o))//true

        console.log(!!undefined)//false
    </script>
</body>

</html>